﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="物料中心成本费用_In.aspx.cs" Inherits="syc.Store.物料中心成本费用_In" %>

<head id="Head1" runat="server">
    <title></title>
    <link href="../js/validationEngine.jquery.css" rel="stylesheet" type="text/css" />
    <script src="../js/jquery.js" type="text/javascript"></script>
    <script src="../js/jquery.validationEngine-zh_cn.js" type="text/javascript"></script>
    <script src="../js/jquery.validationEngine.js" type="text/javascript"></script>
<script type="text/javascript" language="javascript" src="/common.js"></script>
		<script type="text/javascript">
		    $(document).ready(function() {
		        $("#form1").validationEngine({ promptPosition: "topLeft" })
		    });

		    var textboxs = document.getElementsByTagName("input");
		    document.body.onkeypress = function(e) {
		        if (!e) e = window.event;
		        var tag = e.srcElement;
		        if (!tag) tag = e.target;
		       // if (tag.className.toLowerCase() != "textbox") return;
		        var i;
		        if (e.keyCode == 13) {
		            for (i = 0; i < textboxs.length; i++) {
		                if (tag == textboxs[i]) {
		                    //alert(i);
		                    if (i < textboxs.length - 1) {
		                        textboxs[i + 1].focus();
		                    }
		                    else {
		                        textboxs[textboxs.length].focus();
		                    }
		                }
		            }
		        }
		    }; 
	</script>       
    
    
    
</head>
<body>

    <form id="form1" runat="server">
    <div id="wintop" class="wintop" style="display:none;">物料中心成本费用录入</div>
    <div>
    <asp:Panel ID="Panel1" runat="server" CssClass="panel">
    <table>
    <tr>
    <td><asp:Button ID="save" runat="server" CssClass="button" Text="保 存" 
            onclick="save_Click" /></td>
    <td><input type="button" value="关 闭" class="button" onclick="parent.swin2_close();" /></td>
    <td>年度：</td>
    <td>
      <asp:DropDownList ID="DL_year" runat="server">       
        <asp:ListItem>2010</asp:ListItem>
        <asp:ListItem>2011</asp:ListItem>
        <asp:ListItem>2012</asp:ListItem>
        <asp:ListItem>2013</asp:ListItem>
        <asp:ListItem>2014</asp:ListItem>
        <asp:ListItem>2015</asp:ListItem>
      </asp:DropDownList>
    </td>
    <td>月份：</td>
    <td>
    <asp:DropDownList ID="DL_month" runat="server">
        <asp:ListItem>1</asp:ListItem>   
        <asp:ListItem>2</asp:ListItem>
        <asp:ListItem>3</asp:ListItem>
        <asp:ListItem>4</asp:ListItem>
        <asp:ListItem>5</asp:ListItem>
        <asp:ListItem>6</asp:ListItem>
        <asp:ListItem>7</asp:ListItem>
        <asp:ListItem>8</asp:ListItem>
        <asp:ListItem>9</asp:ListItem>
        <asp:ListItem>11</asp:ListItem>
        <asp:ListItem>12</asp:ListItem>
    </asp:DropDownList>
    </td>
    </tr>
    </table>
    </asp:Panel>    
      <asp:Panel ID="Panel3" runat="server" CssClass="panel2">
        <asp:Label ID="Message" runat="server" Text="·准备就绪" CssClass="prompt"></asp:Label>
    </asp:Panel>
    <asp:Panel ID="Panel2" runat="server" CssClass="panel" HorizontalAlign="Center">
<table width="617" border="1" style="border-collapse:separate;font-size:14px;margin-bottom:5px;">
    <thead>
    </thead>
    <tbody>
        <tr ><th colspan="6">物料中心成本费用</th></tr>
        <tr>
          <td width="85"><div align="center">工资：</div></td>
          <td class="style1"><asp:TextBox runat="server" Width="115px" ID="CP_gz" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></td>           
          <td width="72"><div align="center">三金：</div></td>
          <td width="124"><asp:TextBox runat="server"   Width="120px" ID="CP_sj" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></td>     
          <td width="74"><div align="center">水电：</div></td>
          <td width="111"><asp:TextBox runat="server"  Width="120px" ID="CP_sd" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></td>                 
        </tr>
         <tr>
            <td><div align="center">柴油：</div></td>
            <td class="style1"><div align="center"><asp:TextBox runat="server"  Width="115px" 
                    ID="CP_cy" 
                    onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>           
            <td><div align="center">办公费：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_bg" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>     
            <td><div align="center">折旧：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_zj" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>                 
        </tr>
        <tr>
            <td><div align="center">修理费：</div></td>
            <td class="style1" ><div align="center"><asp:TextBox runat="server"  Width="115px" ID="CP_xl" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>           
            <td><div align="center">备品备件：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_bj" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>     
            <td><div align="center">草垫子：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_cdz" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>                 
      </tr>
          <tr>
            <td><div align="center">劳保：</div></td>
            <td class="style1"><div align="center"><asp:TextBox runat="server"  Width="115px" ID="CP_lb" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>           
            <td><div align="center">电器：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_dq" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>     
            <td><div align="center">劳务费：</div></td>
            <td><div align="center"><asp:TextBox runat="server"  Width="120px" ID="CP_lwf" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>                 
         </tr>
         <tr>
         <td><div align="center">五金：</div></td>
            <td class="style1"><div align="center"><asp:TextBox runat="server" Width="115px"  ID="CP_wj" onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false"></asp:TextBox></div></td>           
            <td><div align="center">其它：</div></td>            
            <td  colspan="3"><div align="center"><asp:TextBox runat="server" ID="CP_qt" Width="325px"
                    onKeyPress="if (event.keyCode!=46 && event.keyCode!=45 && (event.keyCode<48 || event.keyCode>57)) event.returnValue=false" 
                   ></asp:TextBox></div></td>                
         </tr>
    </tbody>
</table>
    </asp:Panel>
    
    <asp:Panel ID="Panel_Msg" runat="server" CssClass="panel2">
    <asp:Label ID="Message1" runat="server" Text="·" CssClass="prompt"></asp:Label>
</asp:Panel>        
<asp:SqlDataSource ID="DS1" runat="server" ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
InsertCommand="DELETE FROM [物料中心成本费用表] WHERE [年度]=@年度 AND [月份]=@月份;
               INSERT INTO [物料中心成本费用表] ( [年度], [月份], [工资],[三金], [水电],[柴油],[办公费用],[折旧],[修理费],[备品备件],[草垫子],[劳保],[电器],[劳务费],[五金],[其它]) 
                           VALUES (@年度, @月份, @工资,@三金,@水电,@柴油,@办公费用,@折旧,@修理费,@备品备件,@草垫子,@劳保,@电器,@劳务费,@五金,@其它);             
            ">
        <InsertParameters>
                <asp:ControlParameter ControlID="DL_year" PropertyName="SelectedValue" Name="年度" Type="Int32" />
                <asp:ControlParameter ControlID="DL_month" PropertyName="SelectedValue" Name="月份" Type="Int32" />
                <asp:ControlParameter ControlID="CP_gz" PropertyName="Text" Name="工资" Type="Decimal" />
                <asp:ControlParameter ControlID="CP_sj" PropertyName="Text" Name="三金" Type="Decimal" />
                <asp:ControlParameter ControlID="CP_sd" PropertyName="Text" Name="水电" Type="Decimal" /> 
                <asp:ControlParameter ControlID="CP_cy" PropertyName="Text" Name="柴油" Type="Decimal" />    
                
                <asp:ControlParameter ControlID="CP_bg" PropertyName="Text" Name="办公费用" Type="Decimal" />
                <asp:ControlParameter ControlID="CP_zj" PropertyName="Text" Name="折旧" Type="Decimal" /> 
                <asp:ControlParameter ControlID="CP_xl" PropertyName="Text" Name="修理费" Type="Decimal" />
                
                <asp:ControlParameter ControlID="CP_bj" PropertyName="Text" Name="备品备件" Type="Decimal" />
                <asp:ControlParameter ControlID="CP_cdz" PropertyName="Text" Name="草垫子" Type="Decimal" /> 
                <asp:ControlParameter ControlID="CP_lb" PropertyName="Text" Name="劳保" Type="Decimal" />
                
                <asp:ControlParameter ControlID="CP_dq" PropertyName="Text" Name="电器" Type="Decimal" />
                <asp:ControlParameter ControlID="CP_lwf" PropertyName="Text" Name="劳务费" Type="Decimal" /> 
                <asp:ControlParameter ControlID="CP_wj" PropertyName="Text" Name="五金" Type="Decimal" />   
                
                <asp:ControlParameter ControlID="CP_qt" PropertyName="Text" Name="其它" Type="Decimal" />                                               
        </InsertParameters>
</asp:SqlDataSource>
 </form>
</html>
